<template>
  <div class="overview-page">
    <h2>数据概览</h2>
    <div class="chart-container">
      <div class="chart-placeholder">
        <div class="chart-title">销售趋势图</div>
        <div class="chart-content">
          <div class="bar" style="height: 60%"></div>
          <div class="bar" style="height: 80%"></div>
          <div class="bar" style="height: 45%"></div>
          <div class="bar" style="height: 90%"></div>
          <div class="bar" style="height: 70%"></div>
          <div class="bar" style="height: 85%"></div>
        </div>
      </div>
      <div class="chart-placeholder">
        <div class="chart-title">用户分布图</div>
        <div class="chart-content pie-chart">
          <div class="pie-segment" style="--angle: 120deg; --color: #409eff;"></div>
          <div class="pie-segment" style="--angle: 90deg; --color: #67c23a;"></div>
          <div class="pie-segment" style="--angle: 150deg; --color: #e6a23c;"></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'OverviewPage'
}
</script>

<style scoped>
.overview-page {
  height: 100%;
  padding: 40px;
}

.overview-page h2 {
  font-size: 36px;
  margin-bottom: 40px;
  text-align: center;
}

.chart-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  height: calc(100% - 100px);
}

.chart-placeholder {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-title {
  font-size: 24px;
  margin-bottom: 30px;
  text-align: center;
}

.chart-content {
  display: flex;
  justify-content: space-around;
  align-items: end;
  height: 200px;
}

.bar {
  width: 40px;
  background: linear-gradient(to top, #409eff, #67c23a);
  border-radius: 5px 5px 0 0;
  transition: height 0.3s ease;
}

.pie-chart {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.pie-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--color) 0deg var(--angle), transparent var(--angle));
}

@media (max-width: 768px) {
  .chart-container {
    grid-template-columns: 1fr;
  }
}
</style> 